﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.Entities;
using FluentNHibernate.Mapping;

namespace Database.Mappings
{
    public class QuizMapping:ClassMap<Quiz>
    {
        public QuizMapping()
        {
            Id(x => x.Id);
            References(x => x.Chapter).Not.LazyLoad();
            References(x => x.User).Not.LazyLoad();
            HasMany(x => x.Questions).Cascade.SaveUpdate();

        }
    }
}
